Hook for managing the ERC-1155 sale contract checkout
UseERC1155SaleContractCheckoutReturnType
() => void
Function to open the checkout modal with the configured ERC-1155 purchase.
() => void
Function to close the checkout modal.
SelectPaymentSettings | undefined
boolean
Whether the contract data is still loading.
boolean
Whether there was an error loading the contract data.
Parameter | Type | Description |
---|---|---|
chain | number | Chain ID where the sale contract is deployed |
contractAddress | string | Address of the ERC-1155 sale contract |
wallet | string | Address of the wallet that will receive the NFTs |
collectionAddress | string | Address of the ERC-1155 token contract |
items | Array<{tokenId: string, quantity: string}> | Array of token IDs and quantities to purchase |
onSuccess | (txnHash: string) => void | (Optional) Callback function when the transaction is successful |
onError | (error: Error) => void | (Optional) Callback function when an error occurs |
onClose | () => void | (Optional) Callback function when the modal is closed |
useERC1155SaleContractPaymentModal
hook is deprecated. Use useERC1155SaleContractCheckout
instead.